package com.dragon.modules.yuegou.model.order;

import com.dragon.modules.yuegou.entity.order.OrderRefundEntity;
import com.dragon.modules.yuegou.enums.order.OrderRefundUserType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单退款模型类
 * 
 * @author pbuilder generated
 * @date 2019-04-29 10:14:24
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class OrderRefund extends OrderRefundEntity {

	/**
	 * 构造一个空订单退款模型对象
	 */
	public OrderRefund() {
		super();
	}

	/**
	 * 依据实体对象的信息构造一个订单退款模型对象
	 * 
	 * @param entity 实体对象
	 */
	public OrderRefund(OrderRefundEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个订单退款模型对象
	 * 
	 * @param other 其它对象
	 */
	public OrderRefund(OrderRefund other) {
		super(other);
	}

	@Override
	public String getId() {
		return id;
	}

	/**
	 * 设置
	 * 
	 * @param id
	 * @return 当前对象
	 */
	public OrderRefund id(String id) {
		this.id = id;
		return this;
	}

	@Override
	public String getOrderNo() {
		return orderNo;
	}

	/**
	 * 设置
	 * 
	 * @param orderNo
	 * @return 当前对象
	 */
	public OrderRefund orderNo(String orderNo) {
		this.orderNo = orderNo;
		return this;
	}

	@Override
	public String getRemarks() {
		return remarks;
	}

	/**
	 * 设置退款备注
	 * 
	 * @param remarks 退款备注
	 * @return 当前对象
	 */
	public OrderRefund remarks(String remarks) {
		this.remarks = remarks;
		return this;
	}

	@Override
	public BigDecimal getAmount() {
		return amount;
	}

	/**
	 * 设置退款金额
	 * 
	 * @param amount 退款金额
	 * @return 当前对象
	 */
	public OrderRefund amount(BigDecimal amount) {
		this.amount = amount;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	/**
	 * 设置退款时间
	 * 
	 * @param createdTime 退款时间
	 * @return 当前对象
	 */
	public OrderRefund createdTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
		return this;
	}

	@Override
	public OrderRefundUserType getUserType() {
		return userType;
	}

	/**
	 * 设置[枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER
	 * 
	 * @param userType [枚举]用户类型：0-系统-SYSTEM、1-会员-MEMBER、2-用户-USER
	 * @return 当前对象
	 */
	public OrderRefund userType(OrderRefundUserType userType) {
		this.userType = userType;
		return this;
	}

	@Override
	public String getCreatedBy() {
		return createdBy;
	}

	/**
	 * 设置
	 * 
	 * @param createdBy
	 * @return 当前对象
	 */
	public OrderRefund createdBy(String createdBy) {
		this.createdBy = createdBy;
		return this;
	}
}
